package com.mgz.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * feign 集成了ribbon用接口的方式统一管理一个服务名的通信
 *
 * @author MiaoGuoZhu
 * @date 2018/5/4 12:07
 */
@FeignClient("client")//服务名
@Component
public interface FeignForwardCenter {

    /**
     * 接收client返回的信息
     *
     * @param name name
     * @return 输入的name和端口
     */
    @GetMapping(value = "/info")
    String getName(@RequestParam(value = "name") String name);
}
